package com.cn.整合.SpringBoot.topic;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

import javax.jms.TextMessage;

/**
 * @author: dlr
 * @data: 2019/8/22 23:27
 * @desc: 配置类SpringBoot整合发布订阅消费者
 */
@Component
public class configConsumerTopic {

    @JmsListener(destination = "${topic-name}")
    public void getMessage (TextMessage text) throws Exception{
        System.err.println("发布订阅消费消息:"+text.getText());
    }
}
